package com.ruoyi.game.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.game.mapper.GameRoundActionMapper;
import com.ruoyi.game.domain.GameRoundAction;
import com.ruoyi.game.service.IGameRoundActionService;

/**
 * 回合操作记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-18
 */
@Service
public class GameRoundActionServiceImpl implements IGameRoundActionService 
{
    @Autowired
    private GameRoundActionMapper gameRoundActionMapper;

    /**
     * 查询回合操作记录
     * 
     * @param id 回合操作记录主键
     * @return 回合操作记录
     */
    @Override
    public GameRoundAction selectGameRoundActionById(Long id)
    {
        return gameRoundActionMapper.selectGameRoundActionById(id);
    }

    /**
     * 查询回合操作记录列表
     * 
     * @param gameRoundAction 回合操作记录
     * @return 回合操作记录
     */
    @Override
    public List<GameRoundAction> selectGameRoundActionList(GameRoundAction gameRoundAction)
    {
        return gameRoundActionMapper.selectGameRoundActionList(gameRoundAction);
    }

    /**
     * 新增回合操作记录
     * 
     * @param gameRoundAction 回合操作记录
     * @return 结果
     */
    @Override
    public int insertGameRoundAction(GameRoundAction gameRoundAction)
    {
        gameRoundAction.setCreateTime(DateUtils.getNowDate());
        return gameRoundActionMapper.insertGameRoundAction(gameRoundAction);
    }

    /**
     * 修改回合操作记录
     * 
     * @param gameRoundAction 回合操作记录
     * @return 结果
     */
    @Override
    public int updateGameRoundAction(GameRoundAction gameRoundAction)
    {
        return gameRoundActionMapper.updateGameRoundAction(gameRoundAction);
    }

    /**
     * 批量删除回合操作记录
     * 
     * @param ids 需要删除的回合操作记录主键
     * @return 结果
     */
    @Override
    public int deleteGameRoundActionByIds(Long[] ids)
    {
        return gameRoundActionMapper.deleteGameRoundActionByIds(ids);
    }

    /**
     * 删除回合操作记录信息
     * 
     * @param id 回合操作记录主键
     * @return 结果
     */
    @Override
    public int deleteGameRoundActionById(Long id)
    {
        return gameRoundActionMapper.deleteGameRoundActionById(id);
    }
}
